From: Richard M. Stallman Date: Mon, 24 May 1993 18:46:13 +0000 (+0000) Subject: (shell-command): Don't activate mark even momentarily. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96031 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=c3e46f0c63ec0a2278d7f22ec8ace85dc442407c;p=emacs.git (shell-command): Don't activate mark even momentarily. --- diff --git a/lisp/simple.el b/lisp/simple.el index f5184105361..729685ddaed 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -648,7 +648,12 @@ This cannot be done asynchronously." ;; aliases for shell commands then they can still have them. (call-process shell-file-name nil t nil "-c" command) - (exchange-point-and-mark)) + ;; This is like exchange-point-and-mark, but doesn't activate the mark. + ;; It is cleaner to avoid activation, even though the command + ;; loop would deactivate the mark because we inserted text. + (goto-char (prog1 (mark t) + (set-marker (mark-marker) (point) + (current-buffer))))) ;; Preserve the match data in case called from a program. (let ((data (match-data))) (unwind-protect